package com.xzy.service.impl;

import com.xzy.entity.Content;
import com.xzy.entity.Report;
import com.xzy.mapper.ReportMapper;
import com.xzy.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {
    @Autowired
    private ReportMapper reportMapper;
    @Override
    public void addReport(Report report) {
        reportMapper.addReport(report);
    }


    @Override
    public List<Report> getAllReport() {
        return reportMapper.getAllReport();
    }

    @Override
    public Report getReport(int reportId) {
        return reportMapper.getReport(reportId);
    }

    @Override
    public Report getReportByName(String reportTitle,String reportDate) {
        return reportMapper.getReportByName(reportTitle,reportDate);
    }

    @Override
    public void updateReport(Report report) {
        reportMapper.updateReport(report);
    }

    @Override
    public void deleteReport(int reportId) {
      reportMapper.deleteReport(reportId);
    }

    @Override
    public List<Report> getReportByDate(String reportDate) {
        return reportMapper.getReportByDate(reportDate);
    }

    @Override
    public Report getReportByDepartmentAndDate(int departmentId, String reportDate) {
        return reportMapper.getReportByDepartmentAndDate(departmentId,reportDate);
    }

    @Override
    public List<Integer> getDepartmetByDate(String reportDate) {
        return reportMapper.getDepartmetByDate(reportDate);
    }

}
